import { createRouter, createWebHashHistory } from 'vue-router'
import { constantRoute } from '@/router/routes'

const router = createRouter({
  history: createWebHashHistory(),
  routes: constantRoute,
  // 路由切换滚动锚点控制, 对于所有路由导航简单地让页面滚动到顶部
  // https://www.cnblogs.com/goloving/p/9211233.html
  scrollBehavior() {
    return {
      left: 0,
      right: 0,
    }
  },
})

export default router
